package de.puc.defencetower.view.tui;

import java.util.Timer;
import java.util.TimerTask;

public class TUIFPSTimer extends Timer {

	private final TUIWindow mapWindow;

	private final static long FPS_TIME = 200;

	public TUIFPSTimer(final TUIWindow mapwindow) {
		this.mapWindow = mapwindow;
	}

	public void start() {
		schedule(new TimerTask() {

			@Override
			public void run() {
				mapWindow.print();
			}
		}, 0, FPS_TIME);
	}
}
